//variables.less
//一定要加上这一行！！！
@import "~ant-design-vue/lib/style/themes/default.less";

@primary-color: #1890ff; // 全局主色
@link-color: #1890ff; // 链接色
@success-color: #52c41a; // 成功色
@warning-color: #faad14; // 警告色
@error-color: #f5222d; // 错误色


@primary-1: color(~`colorPalette('@{primary-color}', 1) `);
@primary-2: color(~`colorPalette('@{primary-color}', 2) `);
@primary-3: color(~`colorPalette('@{primary-color}', 3) `);
@primary-4: color(~`colorPalette('@{primary-color}', 4) `);
@primary-5: color(~`colorPalette('@{primary-color}', 5) `);
@primary-6: @primary-color;
@primary-7: color(~`colorPalette('@{primary-color}', 7) `);
@primary-8: color(~`colorPalette('@{primary-color}', 8) `);
@primary-9: color(~`colorPalette('@{primary-color}', 9) `);
@primary-10: color(~`colorPalette('@{primary-color}', 10) `);

//@ant-card-button-small-height: `document.getElementsByClassName('ant-card-bordered')[0].clientHeight`;

/*全局less变量*/
@fullsemi-layout-header-height: 5vh; //header高度: 系统名称, 用户等

/*页面less变量:  按钮 + 内容 */
@fullsemi-page-body-height: 100vh - @fullsemi-layout-header-height - 2px; //页面总高度

/*页面按钮*/
@fullsemi-page-button-group-height: 6vh; //页面 最上面的 按钮组 的高度

/*页面内容*/
@fullsemi-page-content-height: @fullsemi-page-body-height - @fullsemi-page-button-group-height; //页面内容高度
@fullsemi-page-content-card-height: @fullsemi-page-content-height ; //页面内容中的card

/*
  定义page-content-card的mixin
  有最大高度限制的: 例如左侧的tree组件
  没有高度限制的: 例如右侧的表格
*/
.fullsemi-page-content-card-base {
  min-height: @fullsemi-page-content-card-height;
  overflow: auto;
}

#fullsemi-page {
  .fullsemi-header {
    height: @fullsemi-layout-header-height !important;
  }

  .fullsemi-content {
    height: @fullsemi-page-body-height !important;
    overflow: auto;

    .fullsemi-page-buttons {
      height: @fullsemi-page-button-group-height !important;
    }

    .fullsemi-page-content {
      min-height: @fullsemi-page-content-height - 2px !important;
      background-color: white;
      width: 100%;

      /**
         有固定高度的card
       */

      .fullsemi-page-content-card-fix:extend(.fullsemi-page-content-card-base all) {
        height: @fullsemi-page-content-card-height !important;
      }

      /**
        可以自定义高度的card
       */

      .fullsemi-page-content-card:extend(.fullsemi-page-content-card-base all) {
      }
    }
  }
}

// 主题使用，删除后主题切换功能失效
// @coldwind
// 2021-01-26 22:00:00
//@table-header-sort-active-bg: darken(@table-header-bg, 3%);
//@table-header-filter-active-bg: darken(@table-header-sort-active-bg, 5%);


@table-selected-row-bg: @primary-5;
@table-row-hover-bg: @primary-3;

.rowClassEven {
  background-color: @primary-2;
}

.rowClassOdd {
  background-color: @primary-1;
}

.rowClassChanged {
  background-color: @primary-5
}

.TreeMainNode {
  color: @primary-3
}

.TreeChildNode {
  color: @primary-5
}

.FollowThemeNode {
  color: @primary-6
}

.ant-form-item {
  width: 100%
}

@keyframes text-animation {
  100% {
    background-position: -400% 0;
  }
}

.howCool {

  /*文字填充色为透明*/
  color: transparent;
  /*背景剪裁为文字，只将文字显示为背景*/
  -webkit-background-clip: text;

  vertical-align: middle;
  /*背景图片向水平方向扩大一倍，这样background-position才有移动与变化的空间*/
  background-size: 400% 100%;
  background-image: -webkit-linear-gradient(right,
  @primary-6,
  @primary-5, @primary-4, @primary-3, @primary-2, @primary-1, @primary-2, @primary-3, @primary-4, @primary-5,
  @primary-6);
  animation: text-animation 8s infinite 0s linear;
}

::-webkit-scrollbar { //滚动条宽度
  height: 16px!important;
  width: 8px;
}

::-webkit-scrollbar-thumb { //滑动滑块条样式
  border-radius: 5px;
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: @primary-6;
}

::-webkit-scrollbar-track { //轨道的样式
  -webkit-box-shadow: none;
  border-radius: 0;
  background: @primary-1;
}

//后台错误提示样式
.exceptionContent .ant-modal-content {
  overflow: hidden;
}

.exceptionContent .ant-modal-content .ant-modal-confirm-body {
  overflow: auto;
}

.exceptionContent .ant-modal-content .ant-modal-confirm-body .ant-modal-confirm-content {
  height: 600px;
  width: 4000px;
  overflow: auto;
  white-space: pre-wrap;
}

.exceptionCont .ant-modal-content .ant-modal-confirm-body .ant-modal-confirm-content {
  white-space: pre-wrap;
}

//设置表格行高,不设置固定高度可能会导致列错位问题
.m-table .ant-table-row {
  height: 41px !important;
}

.m-table .ant-table-row-cell-break-word {
  height: 41px !important;
}

.ant-message{
  z-index: 9000 !important;
  font-weight: bold !important;
  font-size: 20px !important;
}
// message 图标大小
.ant-message .anticon{
  font-size: 20px !important;
}
// message 内容区域
.ant-message-custom-content{
  padding: 10px 16px !important;
}
// message 外部盒子
.ant-message-notice-content{
  border: 1px dashed #ababab !important;
  padding: 0 !important;
}
// message success
.ant-message-success{
  background-color: #c6ffd6 !important;
}
// message warning
.ant-message-warning{
  background-color: #fffc9b !important;
}
// message error
.ant-message-error{
  background-color: #ffdcdc !important;
}
// message info
.ant-message-info{
  background-color: #cef3ff !important;
}


